<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html">
    <h:head>
        <title>Facelet Title</title>
    </h:head>
    <h:body>
        Add New Customer
        <h:form>
            <h:outputLabel for="custName" value="Name: " />
            <h:inputText id="custName" required="true" requiredMessage="Please enter customer name" value="#{createCustomerView.customer['name']}"/>&nbsp;
            <h:message style="color: red;" for="custName" />
            <br />
            <h:outputLabel for="custAddress" value="Address: " />
            <h:inputTextarea id="custAddress" value="#{createCustomerView.customer['address']}" />
            <br />
            <h:outputLabel for="custContactName" value="Contact Name: " />
            <h:inputText id="custContactName" required="true" requiredMessage="Please enter contact name" value="#{createCustomerView.customer['contactName']}" />&nbsp;
            <h:message style="color: red;" for="custContactName" />
            <br />
            <h:outputLabel for="custTelephone" value="Telephone: " />
            <h:inputText id="custTelephone" value="#{createCustomerView.customer['telephone']}" />
            <br />
            <h:outputLabel for="custFax" value="Fax: " />
            <h:inputText id="custFax" value="#{createCustomerView.customer['fax']}" />
            <br />
            <h:outputLabel for="custMobile" value="Mobile: " />
            <h:inputText id="custMobile" value="#{createCustomerView.customer['mobile']}" />
            <br />
            <h:outputLabel for="custEmail" value="Email: " />
            <h:inputText id="custEmail" required="true" requiredMessage="Please enter contact email" value="#{createCustomerView.customer['email']}" />&nbsp;
            <h:message style="color: red;" for="custEmail" />
            <br />
            <h:outputLabel for="custNote" value="Note: " />
            <h:inputTextarea id="custNote" value="#{createCustomerView.customer['note']}" />
            <br />
            <h:commandButton value="Add Customer" action="#{createCustomerView.createCustomer}" />
        </h:form>
    </h:body>
</html>

